package com.thiswhyme.republish.demo.rabbitmq;

import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.stream.annotation.StreamListener;

/**
 * @description: 消费者demo
 * @author: thiswhyme
 * @date: 2021/3/24
 */
@Slf4j
public class DemoConsumer {

    @StreamListener(DemoChannel.INPUT_CHANNEL_LOG)
    public void onLogMessage(String msg) {
        log.info("监听到INPUT_CHANNEL_LOG消息，内容：{}", msg);
    }

    @StreamListener(DemoChannel.INPUT_CHANNEL_CONFIRM)
    public void onConfirmMessage(String msg) {
        log.info("监听到INPUT_CHANNEL_CONFIRM消息，内容：{}", msg);
    }
}
